<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        省份<select  v-model="cityId">
            <option value="1">湖北</option>
            <option value="2">湖南</option>
            <option value="3">河北</option>
        </select>

    </div>
    
</body>
<script>
    new  Vue({
        el:"#app",
        data:{
            cityId:2 ,//cityId为2  那么下拉框中value为2的元素会被选中
            //当下拉框选择的内容 发生改变的时候  会自动给v-model的元素进行赋值
        },
        watch:{
            cityId(newId){
                console.log("新的id为"+newId)
            }
        }
    })


</script>
</html>